package com.bonana.core.services;

import com.bonana.core.entity.CoreUserProfile;
import com.bonana.core.entity.mybatis.*;
import com.bonana.core.result.Response;
import com.bonana.core.vo.OperStatusVO;
import com.bonana.core.vo.ProjectCommentVo;
import com.bonana.core.vo.ProjectVoteVo;

import java.util.List;

/**
 * Created by Administrator on 2016/7/4.
 */
public interface ProjectService {
    int addProject(Project proj);
    int delProjectById(int projId);
    int updateProject(Project proj);
    Project getProjectById(int projId);
    List<Project> getProjs(int pgNum, int pgSize, String query);
    List<Project> getIndexProjs();
    int RemoveFromIndex(int projId);
    int AddToIndex(IndexProject projId);

    Response voteForProject(int projId, int uid, String usource);
    Response FavProject(int projId, int uid);
    void IncProjectViewCnt(int projId,int uid);
    List<VoteLog> getProjectVote(int projId);

    List<ProjectActive> getProjectActiveByPId(int projId);
    int addProjActive(ProjectActive pa);
    int delProjActive(int activeId);
    ProjectActive getActiveById(int activeId);

    List<ProjectCommentVo> getProjectCommentsbyPid(int projId,int pgNum, int pgSize);

    List<ProjectVoteVo> getProjectVotesByPid(int projId, int pgNum, int pgSize);

    int addComment(int projId, int sender, int parrendId, String content);

    List<CoreUserProfile> getProjectRecentVisitor(int projId, int cnt);
    List<Project> getHotProjects(int cnt);

    OperStatusVO getRelation(int projId, int uid);
}
